//书写品牌管理模块接口
import request from '@/utils/request'
import type { TradeMarkResponseData, TradeMark } from './type'
//品牌管理模块接口地址
enum API {
    //获取已有品牌接口
    TRADEMARK_URL = '/admin/product/baseTrademark/',
    //添加品牌
    ADDTRADEMARK_URL = '/admin/product/baseTrademark/save',
    //修改已有品牌
    UPDATETRADEMARK_URL = '/admin/product/baseTrademark/update',
    //删除已有品牌
    DELETE_URL = '/admin/product/baseTrademark/remove/',
}

// 获取已有品牌数据list
export const getTradeMarkList = (pageNo: number, pageSize: number) => request.get<any, TradeMarkResponseData>(API.TRADEMARK_URL + `${pageNo}/${pageSize}`)

// 添加品牌
export const addTradeMark = (data: TradeMark) => request.post<any, any>(API.ADDTRADEMARK_URL, data)

// 修改品牌
export const updateTradeMark = (data: TradeMark) => request.post<any, any>(API.UPDATETRADEMARK_URL, data)

// 删除品牌
export const deleteTradeMark = (id: number) => request.delete<any, any>(API.DELETE_URL + id)